* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, sans-serif; background: #0f172a; color: #e2e8f0; min-height: 100vh; }
.exam-header { background: #1e293b; border-bottom: 1px solid #334155; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; gap: 10px; }
.exam-title { font-weight: 700; font-size: 13px; color: #14b8a6; line-height: 1.3; }
.reset-btn { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; border-radius: 8px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.hdr-right { display: flex; align-items: center; gap: 10px; }
.lang-switcher { display: flex; background: #0f172a; border: 1px solid #334155; border-radius: 8px; padding: 2px; }
.lang-btn { border: none; background: transparent; color: #94a3b8; padding: 5px 10px; font-size: 11px; font-weight: 700; cursor: pointer; border-radius: 6px; }
.lang-btn.active { background: #14b8a6; color: #06231e; }
.prog-bar { height: 4px; background: #1e293b; }
.prog-fill { height: 100%; background: #14b8a6; transition: width .3s; }
.body { max-width: 700px; margin: 0 auto; padding: 28px 16px; }
.start { text-align: center; padding: 40px 20px; }
.start h2 { font-size: 22px; font-weight: 800; color: #14b8a6; margin-bottom: 6px; }
.start .section-tag { font-size: 12px; color: #64748b; margin-bottom: 14px; background: #1e293b; display: inline-block; padding: 4px 10px; border-radius: 20px; }
.start p { color: #94a3b8; font-size: 14px; margin-bottom: 20px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 20px 0; }
.info-card { background: #1e293b; border-radius: 10px; padding: 14px; text-align: center; }
.info-card .val { font-size: 24px; font-weight: 800; color: #14b8a6; }
.info-card .lbl { font-size: 11px; color: #94a3b8; margin-top: 3px; }
.note { font-size: 12px; color: #475569; margin-bottom: 24px; }
.resume-note { display: none; font-size: 12px; color: #14b8a6; background: rgba(20,184,166,.12); border: 1px solid rgba(20,184,166,.3); border-radius: 8px; padding: 8px 12px; margin-bottom: 16px; }
.q-panel { display: none; }
.q-counter { font-size: 12px; color: #94a3b8; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.q-text { font-size: 16px; line-height: 1.7; font-weight: 500; margin-bottom: 14px; color: #f1f5f9; white-space: pre-line; }
.q-img { display: none; margin: 4px 0 18px; text-align: center; }
.q-img img { max-width: 100%; max-height: 280px; border: 1px solid #334155; border-radius: 8px; background: #fff; }
.options { display: flex; flex-direction: column; gap: 10px; }
.opt { background: #1e293b; border: 1.5px solid #334155; border-radius: 10px; padding: 12px 16px; text-align: left; cursor: pointer; transition: all .15s; font-size: 14px; color: #e2e8f0; display: flex; align-items: center; gap: 12px; width: 100%; }
.opt:hover { background: rgba(20,184,166,.08); border-color: rgba(20,184,166,.4); }
.opt.sel { background: rgba(20,184,166,.15); border-color: #14b8a6; color: #2dd4bf; font-weight: 600; }
.opt.correct { background: rgba(34,197,94,.15); border-color: #22c55e; color: #22c55e; font-weight: 600; }
.opt.wrong { background: rgba(239,68,68,.12); border-color: #ef4444; color: #ef4444; }
.opt-lbl { width: 26px; height: 26px; background: #334155; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.opt.sel .opt-lbl { background: #14b8a6; color: #06231e; }
.opt.correct .opt-lbl { background: #22c55e; color: #0f172a; }
.opt.wrong .opt-lbl { background: #ef4444; color: #fff; }
.feedback { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.6; display: none; }
.feedback.ok { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); color: #86efac; }
.feedback.ng { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }
.feedback .sol-img { margin-top: 10px; text-align: center; }
.feedback .sol-img img { max-width: 100%; max-height: 260px; border: 1px solid #334155; border-radius: 8px; background: #fff; }
.nav { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.btn { padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-size: 13px; font-weight: 600; transition: all .15s; }
.btn-outline { background: transparent; border: 1.5px solid #475569; color: #94a3b8; }
.btn-outline:hover { border-color: #94a3b8; color: #e2e8f0; }
.btn-primary { background: #14b8a6; color: #06231e; }
.btn-primary:hover { background: #0d9488; }
.btn-primary:disabled { background: #475569; color: #fff; cursor: not-allowed; }
.q-dots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 16px; }
.dot { width: 24px; height: 24px; border-radius: 4px; background: #1e293b; border: 1px solid #334155; font-size: 9px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #64748b; transition: all .1s; }
.dot.current { background: #14b8a6; color: #06231e; font-weight: 700; }
.dot.correct { background: rgba(34,197,94,.2); border-color: #22c55e; color: #22c55e; }
.dot.wrong { background: rgba(239,68,68,.15); border-color: #ef4444; color: #ef4444; }
.text-input { width: 100%; max-width: 320px; padding: 12px 14px; border-radius: 10px; border: 1.5px solid #334155; background: #1e293b; color: #e2e8f0; font-size: 14px; }
.input-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.result { display: none; text-align: center; padding: 32px 20px; }
.score-ring { width: 130px; height: 130px; border-radius: 50%; border: 10px solid #1e293b; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; position: relative; }
.score-ring::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; background: conic-gradient(#14b8a6 calc(var(--p,0) * 1%), #1e293b 0); z-index: -1; }
.res-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.res-sub { color: #94a3b8; font-size: 14px; margin-bottom: 20px; }
.res-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.review { text-align: left; margin-top: 28px; display: flex; flex-direction: column; gap: 8px; }
.ri { background: #1e293b; border-radius: 8px; padding: 12px 14px; border-left: 4px solid; }
.ri.ok { border-color: #22c55e; }
.ri.ng { border-color: #ef4444; }
.rq { font-size: 13px; color: #cbd5e1; margin-bottom: 5px; white-space: pre-line; }
.ra { font-size: 12px; margin-bottom: 3px; }
.ra .ok-a { color: #22c55e; }
.ra .ng-a { color: #ef4444; }
.re { font-size: 11px; color: #64748b; margin-top: 3px; }
.hidden { display: none !important; }
@media (max-width: 480px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
  .q-text { font-size: 14px; }
  .exam-title { font-size: 11px; }
}
